3.4 \(\int (a+b x) \sin (c+d x) \, dx\)

Optimal. Leaf size=28 \[ \frac{b \sin (c+d x)}{d^2}-\frac{(a+b x) \cos (c+d x)}{d} \]

[Out]

-(((a + b*x)*Cos[c + d*x])/d) + (b*Sin[c + d*x])/d^2

________________________________________________________________________________________

Rubi [A]  time = 0.0166503, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3296, 2637} \[ \frac{b \sin (c+d x)}{d^2}-\frac{(a+b x) \cos (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x)*Sin[c + d*x],x]

[Out]

-(((a + b*x)*Cos[c + d*x])/d) + (b*Sin[c + d*x])/d^2

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+b x) \sin (c+d x) \, dx &=-\frac{(a+b x) \cos (c+d x)}{d}+\frac{b \int \cos (c+d x) \, dx}{d}\\ &=-\frac{(a+b x) \cos (c+d x)}{d}+\frac{b \sin (c+d x)}{d^2}\\ \end{align*}

Mathematica [A]  time = 0.0747545, size = 27, normalized size = 0.96 \[ \frac{b \sin (c+d x)-d (a+b x) \cos (c+d x)}{d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)*Sin[c + d*x],x]

[Out]

(-(d*(a + b*x)*Cos[c + d*x]) + b*Sin[c + d*x])/d^2

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 52, normalized size = 1.9 \begin{align*}{\frac{1}{d} \left ({\frac{b \left ( \sin \left ( dx+c \right ) - \left ( dx+c \right ) \cos \left ( dx+c \right ) \right ) }{d}}-\cos \left ( dx+c \right ) a+{\frac{cb\cos \left ( dx+c \right ) }{d}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)*sin(d*x+c),x)

[Out]

1/d*(b/d*(sin(d*x+c)-(d*x+c)*cos(d*x+c))-cos(d*x+c)*a+b*c/d*cos(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 0.984978, size = 72, normalized size = 2.57 \begin{align*} -\frac{a \cos \left (d x + c\right ) - \frac{b c \cos \left (d x + c\right )}{d} + \frac{{\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} b}{d}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c),x, algorithm="maxima")

[Out]

-(a*cos(d*x + c) - b*c*cos(d*x + c)/d + ((d*x + c)*cos(d*x + c) - sin(d*x + c))*b/d)/d

________________________________________________________________________________________

Fricas [A]  time = 1.65849, size = 70, normalized size = 2.5 \begin{align*} -\frac{{\left (b d x + a d\right )} \cos \left (d x + c\right ) - b \sin \left (d x + c\right )}{d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c),x, algorithm="fricas")

[Out]

-((b*d*x + a*d)*cos(d*x + c) - b*sin(d*x + c))/d^2

________________________________________________________________________________________

Sympy [A]  time = 0.242294, size = 46, normalized size = 1.64 \begin{align*} \begin{cases} - \frac{a \cos{\left (c + d x \right )}}{d} - \frac{b x \cos{\left (c + d x \right )}}{d} + \frac{b \sin{\left (c + d x \right )}}{d^{2}} & \text{for}\: d \neq 0 \\\left (a x + \frac{b x^{2}}{2}\right ) \sin{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c),x)

[Out]

Piecewise((-a*cos(c + d*x)/d - b*x*cos(c + d*x)/d + b*sin(c + d*x)/d**2, Ne(d, 0)), ((a*x + b*x**2/2)*sin(c),
True))

________________________________________________________________________________________

Giac [A]  time = 1.10727, size = 42, normalized size = 1.5 \begin{align*} -\frac{{\left (b d x + a d\right )} \cos \left (d x + c\right )}{d^{2}} + \frac{b \sin \left (d x + c\right )}{d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c),x, algorithm="giac")

[Out]

-(b*d*x + a*d)*cos(d*x + c)/d^2 + b*sin(d*x + c)/d^2